/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package updater_new;

/**
 *
 * @author rbs
 */
public class Version {
    
    private int version[] = new int[3];

    public int getValue()
    {
        return version[0]*100 + version[1]*10 + version[2];
    }
    public Version(String input) {

        String splitted[] = input.split("\\.");

        for(int i = 0; i < 3; i++)
            version[i] = Integer.parseInt(splitted[i]);
    }

    public String getString()
    {
        return version[0] + "." + version[1] + "." + version[2];
    }

    public static boolean isNewer(Version ver1, Version ver2)
    {
        return ver1.getValue() < ver2.getValue();
    }

}
